package com.glasses.manage.auth.dao.impl;

import com.glasses.manage.auth.dao.UserDao;
import com.glasses.manage.auth.entity.User;
import com.glasses.manage.auth.entity.UserAddress;
import com.glasses.manage.core.dao.BaseDaoImpl;
import org.springframework.stereotype.Repository;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Created by yy on 2017/10/12.
 */
@Repository("userDao")
public class UserDaoImpl extends BaseDaoImpl<User> implements UserDao {
    @Override
    public List<User> getUserList(String userName, String telphone) {
        Map<String, Object> map = new HashMap<>();
        map.put("userName", userName);
        map.put("telphone", telphone);
        return super.listBy(map, "getUserList");
    }

    @Override
    public List<UserAddress> getUserAddressList(String userName) {
        Map<String, Object> map = new HashMap<>();
        map.put("userName", userName);
        return super.listBy(map, "getUserAddressList");
    }
}
